package com.acdc.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.acdc.mapper.ElectricityMeterActivePowerMapper;
import com.acdc.domain.ElectricityMeterActivePower;
import com.acdc.service.IElectricityMeterActivePowerService;

/**
 * 电能正向有功功率记录Service业务层处理
 * 
 * @author acdc
 * @date 2025-08-12
 */
@Service
public class ElectricityMeterActivePowerServiceImpl implements IElectricityMeterActivePowerService 
{
    @Autowired
    private ElectricityMeterActivePowerMapper electricityMeterActivePowerMapper;

    /**
     * 查询电能正向有功功率记录
     * 
     * @param id 电能正向有功功率记录主键
     * @return 电能正向有功功率记录
     */
    @Override
    public ElectricityMeterActivePower selectElectricityMeterActivePowerById(Long id)
    {
        return electricityMeterActivePowerMapper.selectElectricityMeterActivePowerById(id);
    }

    /**
     * 查询电能正向有功功率记录列表
     * 
     * @param electricityMeterActivePower 电能正向有功功率记录
     * @return 电能正向有功功率记录
     */
    @Override
    public List<ElectricityMeterActivePower> selectElectricityMeterActivePowerList(ElectricityMeterActivePower electricityMeterActivePower)
    {
        return electricityMeterActivePowerMapper.selectElectricityMeterActivePowerList(electricityMeterActivePower);
    }

    /**
     * 新增电能正向有功功率记录
     * 
     * @param electricityMeterActivePower 电能正向有功功率记录
     * @return 结果
     */
    @Override
    public int insertElectricityMeterActivePower(ElectricityMeterActivePower electricityMeterActivePower)
    {
        return electricityMeterActivePowerMapper.insertElectricityMeterActivePower(electricityMeterActivePower);
    }

    /**
     * 修改电能正向有功功率记录
     * 
     * @param electricityMeterActivePower 电能正向有功功率记录
     * @return 结果
     */
    @Override
    public int updateElectricityMeterActivePower(ElectricityMeterActivePower electricityMeterActivePower)
    {
        return electricityMeterActivePowerMapper.updateElectricityMeterActivePower(electricityMeterActivePower);
    }

    /**
     * 批量删除电能正向有功功率记录
     * 
     * @param ids 需要删除的电能正向有功功率记录主键
     * @return 结果
     */
    @Override
    public int deleteElectricityMeterActivePowerByIds(Long[] ids)
    {
        return electricityMeterActivePowerMapper.deleteElectricityMeterActivePowerByIds(ids);
    }

    /**
     * 删除电能正向有功功率记录信息
     * 
     * @param id 电能正向有功功率记录主键
     * @return 结果
     */
    @Override
    public int deleteElectricityMeterActivePowerById(Long id)
    {
        return electricityMeterActivePowerMapper.deleteElectricityMeterActivePowerById(id);
    }
}
